package com.Logistics.mycommon.include;

import com.Logistics.mycommon.tools.GaodMap;

public class Include {
    /**
     * 判断订单是否在网点管辖范围内
     * @param OrderLatitude
     * @param OrderLongitude
     * @param CoreLatitude
     * @param CoreLongitude
     * @param CoreRange
     * @return
     */
    public static boolean WhetherInclude(String OrderLatitude, String OrderLongitude, String CoreLatitude,
                                   String CoreLongitude, String CoreRange) {
        String orderPoint = OrderLatitude + "," + OrderLongitude;
        String corePoint = CoreLatitude + "," + CoreLongitude;

        Long juli = GaodMap.getDistance(orderPoint, corePoint);
        Long coreRangeLong = Long.parseLong(CoreRange);
        System.out.println("距离:"+juli+" "+"范围:"+coreRangeLong);
        if (coreRangeLong >= juli) {
            return true; // 在范围内
        } else {
            return false; // 不在范围内
        }
    }






}